using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using Facebook.Web;
using Facebook.Api.DemoSite.Models;
using System.Text;
using Facebook.Web.Mvc;
using System.Web.Security;

namespace Facebook.Api.DemoSite.Controllers
{
    public class AuthController : FacebookMvcController
    {
        public ActionResult Revoke()
        {
            this.FbContext.Auth.RevokeAuthorization(this.FbSession.Uid);
            this.FbSession.Added = false;
            this.FbContext.Session.Expires = DateTime.Now;

            return this.Redirect("~/");
        }

        public ActionResult Login(String returnUrl)
        {
            this.ViewData["returnUrl"] = returnUrl ?? FormsAuthentication.DefaultUrl;
            return this.View();
        }
    }
}